<?php
/**
 * Created by PhpStorm.
 * User: Mio
 * Date: 2017/10/13
 * Time: 11:29
 */

namespace app\index\model;


use think\Model;

class Follow extends Model
{

    //判断用户是否关注某一频道
    public function checkFollowChannel($user_id, $channel_id)
    {
        return $this->where('user_id =' . $user_id . ' and followed_id =' . $channel_id . ' and follow_type = 1')->count();
    }

}